package com.uum.admin.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uum.admin.dto.UserAuthDTO;
import com.uum.admin.pojo.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.uum.admin.pojo.vo.UserPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    UserAuthDTO getUserByUsername(@Param("username") String username);

    SysUser getUserInfoByUserId(@Param("userId")Long userId);

    int updateUser(SysUser user);

    int completeDeleteBatch(List ids);

    List<UserPageVO> pageUser(Page<UserPageVO> page, @Param(Constants.WRAPPER) QueryWrapper<UserPageVO> queryParam);
}
